import request from '@/utils/request'

// 查询返修领料单列表
export function listEntrance(query) {
  return request({
    url: '/erp/repairMaterial/fxflist',
    method: 'get',
    params: query
  })
}

// 生产列表子菜单查询
export function listEntranceChild(query) {
  return request({
    url: '/erp/repairMaterial/childlistfxf/' + query.repairMaterialId,
    method: 'get',
    params: query
  })
}
///////////////////
// 送检
export function submitEntrance(data) {
  return request({
    url: '/erp/repairMaterialPart/inspect',
    method: 'post',
    data
  })
}

// 入库
export function handleEntranceIn(ids) {
  return request({
    url: '/TRepairMaterialInspectPart/TRepairMaterialInspectPart/in/' + ids,
    method: 'post',
  })
}

// 退货
export function handleEntranceBack(ids) {
  return request({
    url: '/TRepairMaterialInspectPart/TRepairMaterialInspectPart/out/' + ids,
    method: 'post',
  })
}

// 下发
export function handleEntranceDown(data) {
  return request({
    url: '/TRepairMaterialInspectPart/TRepairMaterialInspectPart/issue',
    method: 'post',
    data
  })
}


// 退货
export function repairMaterialPart(data) {
  return request({
    url: '/erp/repairMaterialPart',
    method: 'put',
    data
  })
}
